home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / biz / demo / StylusDemo.lha / Stylus_Demo / REXX / SelectNOT.pvrx < prev    next >
Text File  |  1994-04-16  |  2KB  |  45 lines

  1. /***************************************************************************
  2. *                                                                          *
  3. *  $VER: SelectNOT.pvrx 3.0 (16.Apr.94)                                    *
  4. *  Copyright © 1993 by Stylus, Inc.                                        *
  5. *  Author:  Jeff Blume                                                     *
  6. *                                                                          *
  7. *  This macro selects all objects NOT selected; Deselects those selected.  *
  8. *                                                                          *
  9. *                                                                          *
  10. ***************************************************************************/
  11.  
  12.  
  13. /*
  14. call open STDOUT,"RAM:RxOut.txt",W
  15. call open STDERR,"RAM:RxErr.txt",W
  16. trace R
  17. */
  18.  
  19.  
  20. /* Try to get exclusive lock on project window.
  21.     If can't get lock, not polite to interrupt. */
  22. 'Lock Wait'
  23.  
  24. options results
  25.  
  26. /* Get list of Layer names */
  27. 'GetLayers' LayList;    NumLay = Result
  28.  
  29. /* Loop through list of layers */
  30. do k=0 for NumLay
  31.     'LayerStatus' LayList.k;    if Result=HIDE | Result=LOCK then iterate k
  32.     /* Select all objs not selected in layer */
  33.     'FirstObj' LayList.k; if Result = 0 then iterate k; else Objs.0 = Result
  34.     do i = 0
  35.         'Selected' Objs.i;    Sel = Result
  36.         if Sel ~=0 then 'UnSelect' Objs.i
  37.         else 'SelectObj' Objs.i
  38.         j = i + 1
  39.         'NextObj' Objs.i; Objs.j = Result
  40.         if Objs.j = 0 then leave i
  41.     end
  42. end  /* NumLay loop */
  43.  
  44. 'UnLock'
  45.